﻿@model Nop.Web.Models.WindAlert.ForecastWaveModel
@{
    Layout = "~/Views/Shared/_ColumnsTwo.cshtml";
    Html.AddTitleParts("תחזית גלים");
    Html.AddMetaDescriptionParts("תחזית גלים ממספר מודלים בארץ וברחבי העולם");
    Html.AddMetaKeywordParts("גלישת גלים, גלישה, תחזית גלים , גובה גלים, ");
}

<div class="panel panel-default form-panel">
    <div class="panel-heading">
        <h3 class="">@T("Windalert.WaveForecast.Title")</h3>
    </div>
    <div class="panel-body">
        <div class="wave-graph11">
            <a href='http://isramar.ocean.org.il/wam/default.asp' target='_blank'>
                <img alt='גלישת גלים' src="@Model.Graph" border='0' class="img-responsive" />
            </a>
        </div>
        <ul class="nav nav-tabs">
            <li class="@((Model.addDays == 0) ? "active" : "")"><a href="@Url.RouteUrl("WaveForecast", new { addDays = 0 })">@DateTime.Now.AddDays(0).ToString("dd/MM/yy")</a></li>
            <li class="@((Model.addDays == 1) ? "active" : "")"><a href="@Url.RouteUrl("WaveForecast", new { addDays = 1 })">@DateTime.Now.AddDays(1).ToString("dd/MM/yy")</a></li>
            <li class="@((Model.addDays == 2) ? "active" : "")"><a href="@Url.RouteUrl("WaveForecast", new { addDays = 2 })">@DateTime.Now.AddDays(2).ToString("dd/MM/yy")</a></li>
        </ul>
        <!-- Tab panes -->
        <div class="tab-content">
            <div class="tab-pane active">
                <div class="mapsByHour">
                    @if (DateTime.UtcNow.Hour < 12 || Model.addDays != 0)
                    {
                        <div class="isImage">
                            <span class="hour">6:00</span>
                            <br />
                            <a href='http://isramar.ocean.org.il/wam/default.asp' target='_blank'>
                                <img src="@Model.Isramar6" alt='תחזית גלים' border='0' class="img-responsive" />
                            </a>
                        </div>
                    }
                    <div class="isImage">
                        <span class="hour">12:00</span>
                        <br />
                        <a href='http://isramar.ocean.org.il/wam/default.asp' target='_blank'>
                            <img src="@Model.Isramar12" alt='תחזית גלים' border='0' class="img-responsive" />
                        </a>
                    </div>
                    <div class="isImage">
                        <span class="hour">18:00</span>
                        <br />
                        <a href='http://isramar.ocean.org.il/wam/default.asp' target='_blank'>
                            <img src="@Model.Isramar18" alt='תחזית גלים' border='0' class="img-responsive" />
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


@if (!Model.IsRegistered && Model.BlockWaveForecast)
{
    @Html.Action("Login", "WCustomer");
    <script type="text/javascript">
        $(window).load(function () {
            $('#myModal').modal('show');
        });

        $(document).ready(function () {
            $('#myModal').on('hidden.bs.modal', function () {
                window.location.href = "@(Url.RouteUrl("Login"))";
            })
        });
    </script>
}
